package com.ftg.learn.controller;

import com.ftg.learn.entity.Teacher;
import com.ftg.learn.service.ITeacher;
import com.ftg.learn.service.StudentService;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author kangjx
 * @createTime 2022/9/13
 */
@RestController
@RequestMapping("/tea")
public class TeacherController {

    @Resource
    @Qualifier("teacherServiceImpl")
    ITeacher iTeacher;

    @Resource
    StudentService stu;

    @GetMapping("/teacher")
    public Map<String,Object> show(){
        Map<String,Object> map = new ConcurrentHashMap<>();
        map.put("student",stu.list());
        map.put("prot",9092);
        return map;
    }

}
